package com.ynny.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.ynny.blockhandler.MonitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MonitorController {
    @SentinelResource(value = "helloResource", blockHandler = "helloBlockHandler",
            blockHandlerClass = MonitorBlockHandler.class)
    @GetMapping("/monitor/hello")
    public String hello() {
        return "hello sentinel";
    }

}